import React, {useState} from 'react';
import ModalContent from "./ModalContent";

function NoPortalExample(props) {
    const [showModal, setShowModal] = useState(false)
    return (
        <div>
            <button onClick={() => setShowModal(true)}>不使用 portal 展示模态</button>
            {showModal && (
                <ModalContent onClose={() => setShowModal(false)} />
            )}
        </div>
    );
}

export default NoPortalExample;